package admin

import database "hft/Database"

type HomeSwiper struct {
	database.Base
	Origin     int    `json:"origin" gorm:"type:tinyint(1);size:1"`
	Cover      string `json:"cover" gorm:"type:text"`
	City       int    `json:"region" gorm:"index"`
	IsOut      bool   `json:"isOut" gorm:"comment:是否为外部链接"`
	Link       string `json:"link" gorm:"comment:链接跳转;type:text"`
	RegionLink string `json:"regionLink"`
	PageType   int    `json:"pageType" gorm:"comment:页面类型 1为楼盘 2为资讯"`
	ContId     int    `json:"contId" gorm:"comment:内容id 指的是楼盘或者资讯的id"`
	ContName   string `json:"contName" gorm:"comment:内容标题"`
	// ShopRoute ShopRoute `json:"shop_route,omitempty" gorm:"foreignKey:RouteId;references:ID;constraint:OnDelete:SET NULL,OnUpdate:NO ACTION"`
}

func (HomeSwiper) TableName() string {
	return database.TableNameFormat("home_swiper")
}
